from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import PySide2.QtCore

class Opt_widget(QWidget):
    def __init__(self) -> None:
        super().__init__()

        self.layout = QHBoxLayout(self)

        self.horizontalSpacer = QSpacerItem(0, 0, QSizePolicy.Expanding, QSizePolicy.Minimum)
        self.layout.addItem(self.horizontalSpacer)
        self.layout.setContentsMargins(0,0,0,0)
        self.layout.setSpacing(0)

    def new_btn(self,name:str) -> QPushButton:
        btn = QPushButton(name)
        self.layout.addWidget(btn)
        return btn

